import * as requestService from './../utils/requestService';

export function getUserInfo(params = {}) {
  let url = '/user/info'
  return requestService.get(url, params)
}

export function putUserInfo(body = {}) {
  let url = '/user/update'
  return requestService.put(url, body)
}

export function postSaveRelation(body = {}) {
  let url = '/user/save_relation'
  return requestService.post(url, body)
}


export function getUserSign() {
  let url = '/user/sign'
  return requestService.get(url)
}

export function getUserChats() {
  let url = '/user/chats'
  return requestService.get(url)
}

export function getUserShare() {
  let url = '/user/share'
  return requestService.get(url)
}

export function getUserCollect() {
  let url = '/user/collect'
  return requestService.get(url)
}


export function delUserCollect(id) {
  let url = '/user/collect/'+id
  return requestService.del(url)
}

export function getUserHistory() {
  let url = '/user/history/'
  return requestService.get(url)
}

export function getUserOrder() {
  let url = '/user/order'
  return requestService.get(url)
}

export function postHistory(body = {}) {
  let url = '/user/history'
  return requestService.post(url, body)
}


export function getLike(id) {
  let url = '/user/like/'+id
  return requestService.get(url)
}


export function postCollect(body = {}) {
  let url = '/user/collect'
  return requestService.post(url, body)
}


export function postAdid(body = {}) {
  let url = '/user/adid'
  return requestService.post(url, body)
}